import axios from "axios";
import baseURL from "./env";

const service = axios.create({
    baseURL: `${baseURL.prod.baseURL}/api/app`,
    timeout: 2000
});

// 请求拦截
axios.interceptors.request.use(function (config) {
    return config;
}, function (error) {
    return Promise.reject(error);
});

//响应拦截
axios.interceptors.response.use(function (response) {
    return response;
}, function (error) {
    return Promise.reject(error);
});

export default service